package lab01;

/**
 * Created by dell on 2017/10/9.
 */
public class Test11 {
    public static void main(String[] args) {
int i,count;
count=0;
for(i=2;i<=100;i++){
    if(isPrimeNumber(i)==true){
        count++;
        System.out.println(i);
        if(count%5==0)
            System.out.println();
    }
}
    }

    public static boolean isPrimeNumber(int num) {
        int j=(int)Math.sqrt(num);
        if(num==2)
            return true;
        for(int i=2;i<=j;i++)
            if(num%i==0)
                return false;
        return true;
    }
}
